/*
  学习目标：redux的分离和结合
  步骤：
     1. 建立模块数据: store/reducer/todo.js 、store/reducer/user.js 
     💥 文件名按功能模块命名： todo.js  user.js
     💥  reducer函数名按功能模块命名： todoReducer
     2. 总模块数据 store/reducer/index.js 里面，通过 combineReducers() 合并
     3. src/store/index.js  用合并后的 rootReducer， 中创建store
     4. 分模块获取数据
        const { list } = useSelector((state) => state.todo)
*/

import { combineReducers } from 'redux';
import todoReducer from './todo';
import userReducer from './user';

const rootReducer = combineReducers({
  todo: todoReducer,
  user: userReducer,
});

// exp
export default rootReducer;
